<?php
class Index_Controller_Index {
    
    /**
     * index handler
     * 
     * @var indexModel 
     */
    public $indexModel;
    
    /**
     * view handler
     * 
     * @var viewModel
     */
    public $viewModel;
    
    /**
     * consructor
     */
    public function __construct() {
        
        $this->indexModel = new Index_Model_Index;
        $this->viewModel = new Core_Model_View('index', 'index');
        
    }
    
    public function entryPoint(array $getVars, array $postVars){
        
        $article = $this->indexModel->getArticle($getVars);
        $this->viewModel->assign('metatile' , $article['metatitle']);
        $this->viewModel->assign('metadescription' , $article['metadescription']);
        $this->viewModel->assign('metakeywords' , $article['metakeywords']);
        $this->viewModel->assign('title' , $article['title']);
        $this->viewModel->assign('content' , $article['content']);
    }
}
?>
